package com.markedquilt.main;

import com.google.common.collect.Maps;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class testStream {

  public static void main(String[] args) {
    Map<String,String> map = Maps.newHashMap();
    map.put("a","test1");
    map.put("b","test2");
    map.put("c","test3");
    Map<String,String> map2 = Maps.newHashMap();
    map2.put("a","test4");
    map2.put("b","test5");
    map2.put("c","test6");
    List<Map<String,String>> list= new ArrayList<>();
    list.add(map);
    list.add(map2);


//    List<Map<String, String>> collect = list.stream().filter(m -> !m.get("b").equals("test5")).collect(Collectors.toList());
    list.stream().filter(m -> m.get("b").equals("test5") && m.get("c").equals("test6")).forEach(m -> m.put("b","/"));
    System.out.println(list);

    User user = new User();
    System.out.println(user);
    System.out.println(user.setUser(user));
  }
}
